
#ifndef DESIGN_PATTERNS_COMPOSITE_COMMODITY_H_
#define DESIGN_PATTERNS_COMPOSITE_COMMODITY_H_

#include <string>

class Commodity
{
protected:
  std::string name_;
  double price_per_;

public:
  Commodity(std::string name, double price);

  virtual std::string get_name() const;

  virtual void Add(Commodity* c);

  virtual void Remove(Commodity* c);

  virtual double CheckOut() = 0;

  virtual ~Commodity() = default;
};

#endif //DESIGN_PATTERNS_COMPOSITE_COMMODITY_H_
